<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Reviving <code>alchemy</code>?',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/08/04.jpg" alt="Acorns and oak leaves on the tree branches" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had 50 grams of cereal and 50 grams of soy milk.
		For each lunch and dinner, I had a veggie patty and pickle sandwich.
		Normally, I add tapioca cheese, but I was frustrated with my coursework and it slipped my mind.
		I thought it looked like something was missing, but I couldn&apos;t place what.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		I&apos;ve found another part of the <code>three.js</code> $a[API] that&apos;s now broken, and thanks to that, I spent hours basically reimplementing the functionality it used to provide.
		Joy.
	</p>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			So you noticed code form the manual isn&apos;t working any more too, huh?
			I&apos;m surprised you were able to patch together some code to make your example work though.
			The <code>three.js</code> $a[API] seems to actually be braking this week, or maybe it even started last week.
			Even code I have that used to run just fine (past coursework submissions) doesn&apos;t work any more, seemingly due to breakage in underlying <code>three.js</code> scripts.
			For example, <code>THREE.OrbitControls()</code> no longer works.
			At all, as far as I can tell.
			Even instantiating a <code>THREE.OrbitControls()</code> causes the script to halt.
			And I just spent a lot of time today implementing functionality that I think <code>THREE.ParametricGeometry()</code> would normally take care of, because any time I tried even instantiating a <code>THREE.ParametricGeometry()</code> object, the script would halt just like when instantiating a <code>THREE.OrbitControls()</code> object.
			Something&apos;s going on with the <code>three.js</code> scripts, and something&apos;s going very wrong.
		</p>
		<p>
			Thank you for your explanation of Bezier splines.
			While I still don&apos;t fully understand them, I think I understand them better after reading your post.
			It&apos;s worth nothing though that you say that a Bezier curve is also known as a spline, but not all splines are actually Bezier curves.
			Bezier curves are a subset of splines, similar to how mammals are a subset of animals.
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2019/08/04.png" alt="Cooking cobble" class="framed-centred-image" width="1024" height="600"/>
	<p>
		I didn&apos;t have a whole lot of time to relax with Minetest today, but I did get some logs harvested so I could cook some cobble for the tunnel.
	</p>
	<p>
		Progress on Building Up From Zero has been slow.
		The simple fact is that I haven&apos;t been enjoying working on it, so I haven&apos;t been working on it.
		The programming is a nice pass-time, but I&apos;m not liking where the project is headed.
		First of all, I have to define a single, all-encompassing representation of each element.
		That representation cannot yield to changes in the subgame either, because if it could, I&apos;d need to worry about redefining each and every node I add with each new version of Minetest Game.
		For that reason, I have to base my representations on the initial forms and uses that these elements had.
		I&apos;m finding that to be a drag, honestly.
		And secondly, I don&apos;t like the frivolous way I&apos;ve decided to spend the palette indexes.
		I need to use them all, but I don&apos;t have a good way to define <strong>*two hundred fifty-six*</strong> versions of the node, so I cut that in sixteen by throwing dye into the mix, and find a way to spend the sixteen indexes I have left.
		It&apos;s ... nowhere near as good as what I was hoping Building Up From Zero would grow to be.
	</p>
	<p>
		I think I&apos;m going to work on plans to bring back my defunct <code>alchemy</code> mod, but with some changes, some of which will come from the remains of Building Up From Zero.
		Mainly, the usefulness of nodes crafted from alchemic abominations will grow as your level goes up.
		I&apos;ll use the various palette indexes for different, similar alchemy-enhanced nodes.
		For example, there are eight types of woody plant in Minetest Game.
		Given the thirty elements I&apos;m working with, eight of which are those plants, I&apos;ll be defining 204 types of wood, if my calculations are correct.
		And that&apos;s if I stick with only allowing two-item alchemy, which seems like the best idea not only because the number of alchemic recipe results to break down and find purposes for would grow exponentially otherwise, but also for technical reasons mainly involving the way I want to replace the leaves of trees of alchemic saplings with the non-plant element-dropping node.
		I mean, if you combine flint, iron, and an apple sapling, should the leaves of the tree be iron ores or gravel?
		Moving on, I&apos;ll be defining 29 things that pass for steel.
		Add in the five wood types the subgame itself defines, and the one steel, and an empty &quot;steel&quot; used for unlocked chests, and there will be 6479 different combinations of wood and steel to make chests from.
		Subtract ten, because the five non-alchemic types of wood are used for regular chests and regular locked chests, and that leaves me with 6469 chests to eventually define.
		Normally, that&apos;d be a huge amount of nodes to define, but palettes let me cut it down to 26 nodes.
		And that&apos;s just the tip of the iceberg.
		I&apos;ll likely come up with an effect for each wood on when used for chests and an effect for each steel, then just have the chest exhibit both effects.
		It&apos;ll bring the the number of effects I have to define down to a feasible level, while possibly providing for some interesting combinations that I otherwise wouldn&apos;t think of.
		It might make the mod appear more organised too, when players notice that frosted steel always seems to have the same effect no matter what chest it&apos;s used in, while gilded steel has some other effect all the time.
		Once they notice, they can use trial and error to find the wood type they like and the steel type they like, they put them together.
	</p>
	<p>
		I&apos;m potentially going to make the recipes very costly, where you have to spend an entire stack of each of the elements you combine.
		The number of alchemic abominations you create from the recipe might be equal to your level though, allowing higher-levelled alchemists to be better at the craft.
		I&apos;m still debating how I want to deal with alchemic recipes though, so that idea might get scrapped early on.
	</p>
	<p>
		So to begin with, as you probably would predict if you&apos;ve read my past journal entries up to this point, I&apos;m going to start out with four elements: coal, iron, sand, and apple trees.
		Given that I&apos;m predictably ignoring newer items as far as recipe ingredients go, just that alone will require me to define eighteen types of chest.
		I have some idea what I want to do with sand-based chests.
		Sand is an element of destruction, but that doesn&apos;t make a very useful node.
		I think for the chests, I&apos;ll make it more of an element of disappearance or displacement.
		Maybe the sand isn&apos;t destroyed.
		Maybe it goes somewhere.
		Where does it go?
		The sand chests will probably harness that strange property of the sand element, and do weird things with their inventory, such as have the same inventory accessed from multiple paces through multiple sand chests.
		That sort of thing.
		I&apos;m thinking that property might belong to sand-wood, though sand-iron might have some similar property, but something different enough that you still might want to use the two together.
	</p>
</section>
END
);
